<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .table {
            border: 1px solid #ccc;
            border-collapse: collapse;
            width: 100%;
        }
        
        .table td {
            border: 1px solid #ccc;
            padding: 6px;
        }
        
        .table th {
            background: #e8e8e8;
            padding: 6px;
        }
    </style>
</head>
<script>
    let arr = [11, 22]
</script>

<body>

</body>

</html>
<script>
    // 需求： 请把下面数据中的对象打印出来：   
    // // 定义一个存储了若干学生信息的数组     
    let students = [{
        name: '小明',
        age: 18,
        gender: '男',
        hometown: '河北省'
    }, {
        name: '小红',
        age: 19,
        gender: '女',
        hometown: '河南省'
    }, {
        name: '小刚',
        age: 17,
        gender: '男',
        hometown: '山西省'
    }, {
        name: '小丽',
        age: 18,
        gender: '女',
        hometown: '山东省'
    }]

    document.write(`
    <table class="table">
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>家乡</th>
        </tr>
    `);

    for (let i = 0; i < students.length; i++) {
        document.write("<tr>");
        document.write("<td>" + (i + 1) + "</td>");
        document.write("<td>" + students[i].name + "</td>");
        document.write("<td>" + students[i].age + "</td>");
        document.write("<td>" + students[i].gender + "</td>");
        document.write("<td>" + students[i].hometown + "</td>");
        document.write("</tr>");
    };

    document.write("</table>");
    document.write("陆梓峰 24510206097");
</script>